<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加/编辑管理员 - Powered By LIUSANY</title>
</head>
<body class="input admin">
	<div class="body">
		<form:form id="inputForm" modelAttribute="user" action="${ctx}/admin/user/save/${user.id}" method="post">
		<input type="hidden" name="id" value="${user.id}"/>
		<fieldset>
			<p>
				<label for="loginName">登录名:</label>
				<input type="text" id="loginName" name="loginName" size="40" value="${user.loginName}"/>
			</p>
			<p>
				<label for="name">用户名:</label>
				<input type="text" id="name" name="name" size="40" value="${user.name}"/>
			</p>
			<p>
				<label for="password">密码:</label>
				<input type="password" id="password" name="password" size="40" value="${user.password}"/>
			</p>
			<p>
				<label for="passwordConfirm">确认密码:</label>
				<input type="password" id="passwordConfirm" name="passwordConfirm" size="40" value="${user.password}"/>
			</p>
			<p>
				<label for="loginName">邮箱:</label>
				<input type="text" id="email" name="email" size="40" value="${user.email}"/>
			</p>
			<p>
				<label for="loginName">权限组:</label>
				<form:checkboxes path="groupList" items="${allGroups}" itemLabel="name" itemValue="id" />
			</p>	
		</fieldset>
		<p>
			<input class="button" type="submit" value="提交"/>&nbsp;	
			<input class="button" type="button" value="返回" onclick="history.back()"/>
		</p>
	</form:form>
	</div>
</body>
</html>